package com.ruoyi.electricity.service;

import com.ruoyi.electricity.domain.ElectricityData;
import com.ruoyi.electricity.domain.ElectricityMeterData;
import com.ruoyi.electricity.domain.TRiskWarnings;
import com.ruoyi.electricity.domain.vo.GisEquipVo;

import java.util.Date;
import java.util.List;

/**
 * 用电Service接口
 *
 * @author ljw
 * @date 2023-08-29
 */
public interface ElectricityDataService
{
    void updateThresholdsForNormalAndAlarmAndWarn(ElectricityData electricityData);
    /**
     * 查询用电
     *
     * @param id 用电主键
     * @return 用电
     */
    public ElectricityData selectElectricityDataById(String id);

    /**
     * 查询用电列表
     *
     * @param electricityData 用电
     * @return 用电集合
     */
    public List<ElectricityData> selectElectricityDataList(ElectricityData electricityData);

    /**
     * 新增用电
     *
     * @param electricityData 用电
     * @return 结果
     */
    public int insertElectricityData(ElectricityData electricityData);

    /**
     * 修改用电
     *
     * @param electricityData 用电
     * @return 结果
     */
    public int updateElectricityData(ElectricityData electricityData);

    /**
     * 批量删除用电
     *
     * @param ids 需要删除的用电主键集合
     * @return 结果
     */
    public int deleteElectricityDataByIds(String[] ids);

    /**
     * 删除用电信息
     *
     * @param id 用电主键
     * @return 结果
     */
    public int deleteElectricityDataById(String id);

    void mergeElectricityDataListToTable(List<ElectricityData> electricityDataList);

    void deleteElectricityDataNotInList(List<ElectricityData> list);

    List<ElectricityData> selectElectricityDataThatNeedToSendAlarm();

    void insertElectricityAlarm(List<ElectricityData> electricityDataList);

    void updateElectricityAlarmStatusAsSent(ElectricityData electricityData);

    void insertElectricityDataToHistoryTable(List<ElectricityData> list);

    void insertElectricityDataToDayTable(List<ElectricityData> list);


    void deleteElectricityData();

    List<ElectricityData> selectElectricityHistoryDataList(ElectricityData electricityData, Date startTime, Date endTime);

    List<TRiskWarnings> selectElectricityAlarmList(TRiskWarnings riskWarnings, Date startTime, Date endTime);
    void  editElectricityAlarmHandle(TRiskWarnings riskWarnings);

    List<GisEquipVo> selectAllGisEquips(GisEquipVo gisEquipVo);

    List<GisEquipVo> selectGisEquipsHasCoordinates();

    void updateGisEquipsCoordinates(GisEquipVo gisEquipVo);

    void deleteElectricityDataToDayTable();

    /**
     * 查询用电列表
     *
     * @param electricityData 用电
     * @return 用电集合
     */
    public List<ElectricityMeterData> selectElectricityDataTodayList();

}
